package state.example;

/**
 * @author Chen Guang
 * @date 2019/4/16 0016 上午 10:35
 */
public class Work {
    private State current;
    private double hour;
    private boolean taskFinished;

    public Work() {
        current = new ForenoonStateImpl();
    }

    public double getHour() {
        return hour;
    }

    public void setHour(double hour) {
        this.hour = hour;
    }

    public State getCurrent() {
        return current;
    }

    public void setCurrent(State current) {
        this.current = current;
    }

    public boolean isTaskFinished() {
        return taskFinished;
    }

    public void setTaskFinished(boolean taskFinished) {
        this.taskFinished = taskFinished;
    }

    public void writeProgram(){
        current.writeProgram(this);
    }
}
